<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/

Route::get('/', function()
{
	return View::make('hello');
});

Route::get('/','LoginController@index');
Route::post('/Login','LoginController@logincheck');
Route::get('/logout','LoginController@logout');
Route::post('/store','LoginController@store');
Route::get('/show/{_id}','LoginController@show');
Route::delete('/show/{_id}','LoginController@destroy');
Route::put('/show/{_id}','LoginController@update');


Route::get('/category','CategoryController@index');
Route::post('/category/store','CategoryController@store');
Route::get('/category/{_id}','CategoryController@show');
Route::put('/category/{_id}/edit','CategoryController@edit'); 
Route::delete('/category/{_id}','CategoryController@destroy');
Route::put('/category/store/{_id}','CategoryController@update');

Route::get('/dashboard','DashboardController@GetProductCount');
// Route::get('/dashboard/cagegory','DashboardController@GetcategoryCount');

Route::resource('/product','ProductController');
Route::resource('/productprice','ProductPriceController');
Route::resource('/order','OrderController');
Route::resource('/productoptions','ProductOptions');
Route::resource('/orderdetail','OrderDetailController');
Route::resource('/option','OptionController');
Route::resource('/optiongroup','OptionGroupController');